import { ajaxService } from '@/utils/request';

const env = import.meta.env;
// let baseURL = env.VITE_API_BASE_URL;
let baseURL = env.VITE_INVENTORY_URL;

// 新增销售出库
export function getInvoiceAll(params?: any) {
  return ajaxService({
    url: '/warehouse/invoice/getall',
    method: 'get',
    baseURL,
    params,
  });
}

// 查询单个发货单详情
export function getInvoiceOne(params?: any) {
  return ajaxService({
    url: '/warehouse/invoice/get',
    method: 'get',
    baseURL,
    params,
  });
}

// 确认发货
export function putConfirmInvoice(data?: any) {
  return ajaxService({
    url: '/warehouse/invoice/confirmInvoice',
    method: 'put',
    baseURL,
    data,
  });
}

// 确认签收
export function putConfirmSign(data?: any) {
  return ajaxService({
    url: '/warehouse/invoice/confirmSign',
    method: 'put',
    baseURL,
    data,
  });
}
